/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package podologia.beansDB;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author Hernan
 */
@Entity
@Table(name = "atencion")
@NamedQueries({@NamedQuery(name = "Atencion.findByIdAtencion", query = "SELECT a FROM Atencion a WHERE a.idAtencion = :idAtencion"), @NamedQuery(name = "Atencion.findByEstatura", query = "SELECT a FROM Atencion a WHERE a.estatura = :estatura"), @NamedQuery(name = "Atencion.findByPeso", query = "SELECT a FROM Atencion a WHERE a.peso = :peso"), @NamedQuery(name = "Atencion.findByCalzado", query = "SELECT a FROM Atencion a WHERE a.calzado = :calzado"), @NamedQuery(name = "Atencion.findByCalzadoNroDer", query = "SELECT a FROM Atencion a WHERE a.calzadoNroDer = :calzadoNroDer"), @NamedQuery(name = "Atencion.findByCalzadoNroIzq", query = "SELECT a FROM Atencion a WHERE a.calzadoNroIzq = :calzadoNroIzq"), @NamedQuery(name = "Atencion.findByTacoDer", query = "SELECT a FROM Atencion a WHERE a.tacoDer = :tacoDer"), @NamedQuery(name = "Atencion.findByTacoIzq", query = "SELECT a FROM Atencion a WHERE a.tacoIzq = :tacoIzq"), @NamedQuery(name = "Atencion.findByDesgasteDer", query = "SELECT a FROM Atencion a WHERE a.desgasteDer = :desgasteDer"), @NamedQuery(name = "Atencion.findByDesgasteIzq", query = "SELECT a FROM Atencion a WHERE a.desgasteIzq = :desgasteIzq"), @NamedQuery(name = "Atencion.findByImagen1", query = "SELECT a FROM Atencion a WHERE a.imagen1 = :imagen1"), @NamedQuery(name = "Atencion.findByImagen2", query = "SELECT a FROM Atencion a WHERE a.imagen2 = :imagen2"), @NamedQuery(name = "Atencion.findByPresion", query = "SELECT a FROM Atencion a WHERE a.presion = :presion"), @NamedQuery(name = "Atencion.findByMontoAtencion", query = "SELECT a FROM Atencion a WHERE a.montoAtencion = :montoAtencion")})
public class Atencion implements Serializable {

    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @Column(name = "idAtencion", nullable = false)
    private Integer idAtencion;
    @Lob
    @Column(name = "detalleAtencion")
    private String detalleAtencion;
    @Column(name = "estatura")
    private String estatura;
    @Column(name = "peso")
    private String peso;
    @Column(name = "calzado")
    private String calzado;
    @Column(name = "calzadoNroDer")
    private String calzadoNroDer;
    @Column(name = "calzadoNroIzq")
    private String calzadoNroIzq;
    @Column(name = "tacoDer")
    private String tacoDer;
    @Column(name = "tacoIzq")
    private String tacoIzq;
    @Column(name = "desgasteDer")
    private String desgasteDer;
    @Column(name = "desgasteIzq")
    private String desgasteIzq;
    @Lob
    @Column(name = "evoPaciente")
    private String evoPaciente;
    @Column(name = "imagen1")
    private String imagen1;
    @Column(name = "imagen2")
    private String imagen2;
    @Column(name = "presion")
    private String presion;
    @Column(name = "montoAtencion")
    private Float montoAtencion;
    @JoinColumn(name = "idDecubito", referencedColumnName = "idDecubito")
    @ManyToOne(cascade = CascadeType.ALL)
    private Decubito idDecubito;
    @JoinColumn(name = "idExaVasc", referencedColumnName = "idExamen")
    @ManyToOne(cascade = CascadeType.ALL)
    private Examvascular idExaVasc;
    @JoinColumn(name = "idExaParam", referencedColumnName = "idExamen")
    @ManyToOne(cascade = CascadeType.ALL)
    private Examparam idExaParam;
    @JoinColumn(name = "idExaNeuro", referencedColumnName = "idExamen")
    @ManyToOne(cascade = CascadeType.ALL)
    private Examenneuro idExaNeuro;

    public Atencion() {
    }

    public Atencion(Integer idAtencion) {
        this.idAtencion = idAtencion;
    }

    public Integer getIdAtencion() {
        return idAtencion;
    }

    public void setIdAtencion(Integer idAtencion) {
        Integer oldIdAtencion = this.idAtencion;
        this.idAtencion = idAtencion;
        changeSupport.firePropertyChange("idAtencion", oldIdAtencion, idAtencion);
    }

    public String getDetalleAtencion() {
        return detalleAtencion;
    }

    public void setDetalleAtencion(String detalleAtencion) {
        String oldDetalleAtencion = this.detalleAtencion;
        this.detalleAtencion = detalleAtencion;
        changeSupport.firePropertyChange("detalleAtencion", oldDetalleAtencion, detalleAtencion);
    }

    public String getEstatura() {
        return estatura;
    }

    public void setEstatura(String estatura) {
        String oldEstatura = this.estatura;
        this.estatura = estatura;
        changeSupport.firePropertyChange("estatura", oldEstatura, estatura);
    }

    public String getPeso() {
        return peso;
    }

    public void setPeso(String peso) {
        String oldPeso = this.peso;
        this.peso = peso;
        changeSupport.firePropertyChange("peso", oldPeso, peso);
    }

    public String getCalzado() {
        return calzado;
    }

    public void setCalzado(String calzado) {
        String oldCalzado = this.calzado;
        this.calzado = calzado;
        changeSupport.firePropertyChange("calzado", oldCalzado, calzado);
    }

    public String getCalzadoNroDer() {
        return calzadoNroDer;
    }

    public void setCalzadoNroDer(String calzadoNroDer) {
        String oldCalzadoNroDer = this.calzadoNroDer;
        this.calzadoNroDer = calzadoNroDer;
        changeSupport.firePropertyChange("calzadoNroDer", oldCalzadoNroDer, calzadoNroDer);
    }

    public String getCalzadoNroIzq() {
        return calzadoNroIzq;
    }

    public void setCalzadoNroIzq(String calzadoNroIzq) {
        String oldCalzadoNroIzq = this.calzadoNroIzq;
        this.calzadoNroIzq = calzadoNroIzq;
        changeSupport.firePropertyChange("calzadoNroIzq", oldCalzadoNroIzq, calzadoNroIzq);
    }

    public String getTacoDer() {
        return tacoDer;
    }

    public void setTacoDer(String tacoDer) {
        String oldTacoDer = this.tacoDer;
        this.tacoDer = tacoDer;
        changeSupport.firePropertyChange("tacoDer", oldTacoDer, tacoDer);
    }

    public String getTacoIzq() {
        return tacoIzq;
    }

    public void setTacoIzq(String tacoIzq) {
        String oldTacoIzq = this.tacoIzq;
        this.tacoIzq = tacoIzq;
        changeSupport.firePropertyChange("tacoIzq", oldTacoIzq, tacoIzq);
    }

    public String getDesgasteDer() {
        return desgasteDer;
    }

    public void setDesgasteDer(String desgasteDer) {
        String oldDesgasteDer = this.desgasteDer;
        this.desgasteDer = desgasteDer;
        changeSupport.firePropertyChange("desgasteDer", oldDesgasteDer, desgasteDer);
    }

    public String getDesgasteIzq() {
        return desgasteIzq;
    }

    public void setDesgasteIzq(String desgasteIzq) {
        String oldDesgasteIzq = this.desgasteIzq;
        this.desgasteIzq = desgasteIzq;
        changeSupport.firePropertyChange("desgasteIzq", oldDesgasteIzq, desgasteIzq);
    }

    public String getEvoPaciente() {
        return evoPaciente;
    }

    public void setEvoPaciente(String evoPaciente) {
        String oldEvoPaciente = this.evoPaciente;
        this.evoPaciente = evoPaciente;
        changeSupport.firePropertyChange("evoPaciente", oldEvoPaciente, evoPaciente);
    }

    public String getImagen1() {
        return imagen1;
    }

    public void setImagen1(String imagen1) {
        String oldImagen1 = this.imagen1;
        this.imagen1 = imagen1;
        changeSupport.firePropertyChange("imagen1", oldImagen1, imagen1);
    }

    public String getImagen2() {
        return imagen2;
    }

    public void setImagen2(String imagen2) {
        String oldImagen2 = this.imagen2;
        this.imagen2 = imagen2;
        changeSupport.firePropertyChange("imagen2", oldImagen2, imagen2);
    }

    public String getPresion() {
        return presion;
    }

    public void setPresion(String presion) {
        String oldPresion = this.presion;
        this.presion = presion;
        changeSupport.firePropertyChange("presion", oldPresion, presion);
    }

    public Float getMontoAtencion() {
        return montoAtencion;
    }

    public void setMontoAtencion(Float montoAtencion) {
        Float oldMontoAtencion = this.montoAtencion;
        this.montoAtencion = montoAtencion;
        changeSupport.firePropertyChange("montoAtencion", oldMontoAtencion, montoAtencion);
    }

    public Decubito getIdDecubito() {
        return idDecubito;
    }

    public void setIdDecubito(Decubito idDecubito) {
        Decubito oldIdDecubito = this.idDecubito;
        this.idDecubito = idDecubito;
        changeSupport.firePropertyChange("idDecubito", oldIdDecubito, idDecubito);
    }

    public Examvascular getIdExaVasc() {
        return idExaVasc;
    }

    public void setIdExaVasc(Examvascular idExaVasc) {
        Examvascular oldIdExaVasc = this.idExaVasc;
        this.idExaVasc = idExaVasc;
        changeSupport.firePropertyChange("idExaVasc", oldIdExaVasc, idExaVasc);
    }

    public Examparam getIdExaParam() {
        return idExaParam;
    }

    public void setIdExaParam(Examparam idExaParam) {
        Examparam oldIdExaParam = this.idExaParam;
        this.idExaParam = idExaParam;
        changeSupport.firePropertyChange("idExaParam", oldIdExaParam, idExaParam);
    }

    public Examenneuro getIdExaNeuro() {
        return idExaNeuro;
    }

    public void setIdExaNeuro(Examenneuro idExaNeuro) {
        Examenneuro oldIdExaNeuro = this.idExaNeuro;
        this.idExaNeuro = idExaNeuro;
        changeSupport.firePropertyChange("idExaNeuro", oldIdExaNeuro, idExaNeuro);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idAtencion != null ? idAtencion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Atencion)) {
            return false;
        }
        Atencion other = (Atencion) object;
        if ((this.idAtencion == null && other.idAtencion != null) || (this.idAtencion != null && !this.idAtencion.equals(other.idAtencion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "podologia.beansDB.Atencion[idAtencion=" + idAtencion + "]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
}
